package com.lyj.io.module.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 角色
 *
 * @author: 李亚杰
 * @version: 1.0
 * @date: 2021/9/13 14:50
 */
@ApiModel("角色表")
@Data
@TableName("sys_role")
public class SysRole {
    /**
     * 角色id
     */
    @ApiModelProperty(value = "角色id", example = "")
    @TableId(type = IdType.ASSIGN_ID)
    private String roleId;

    /**
     * 角色编码
     */
    @ApiModelProperty(value = "角色编码", example = "")
    private String roleCode;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", example = "")
    private String roleName;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", example = "")
    private String creater;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "")
    @TableField(value = "CREATE_DATE", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createDate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", example = "")
    @TableField(value = "UPDATE_DATE", fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date updateDate;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", example = "")
    private String remark;

    /**
     * 删除标识
     */
    @ApiModelProperty(value = "删除标识,默认为0", example = "")
    private String deleteFlag;

}
